package com.project.rbac.controller;


import com.project.rbac.entity.SysUser;
import com.project.rbac.service.ISysUserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 用户表 前端控制器
 * </p>
 *
 * @author nickBoy
 * @since 2021-06-15
 */
@RestController
@RequestMapping("/rbac/sys-user")
public class SysUserController {

    private final ISysUserService iSysUserService;

    public SysUserController(ISysUserService iSysUserService) {
        this.iSysUserService = iSysUserService;
    }

    @GetMapping("/getUser")
    public SysUser getUser() {
        return iSysUserService.getById(1);
    }

    @GetMapping("/findAllUser")
    public List<SysUser> findAllUser() {
        return iSysUserService.findAllUser();
    }

}
